package com.jsmtr.rms.service.impl;

import com.jsmtr.rms.dao.DaoService;
import com.jsmtr.rms.entity.DoMSConfirm;
import com.jsmtr.rms.service.IDoConfirmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: cyx
 * @description:
 * @date: Created in 2019/6/14 1:21
 * @modified by:
 */
@Service
public class DoConfirmService implements IDoConfirmService {
    @Autowired
    private DaoService dao;

    public void setDao(DaoService dao) {
        this.dao = dao;
    }

    @Override
    public DoMSConfirm getUserMSComfrim(String msid) throws Exception {
       List<DoMSConfirm> confirmList= dao.find("from DoMSConfirm where msuserid='" + msid + "'");
        if (confirmList!=null&&confirmList.size()>0){
            return  confirmList.get(0);
        }else{
            return  null;
        }
    }
}
